home *** CD-ROM | disk | FTP | other *** search
/ Go64! / Go64_2000-07_2000_CSW_Side_B.d64 / naivem 1 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  406b  |  18 lines

  1. 1 g=0
  2. 2 print"[147]"
  3. 10 t$="abraham says abracadabra but nothing moves at all. "
  4. 15 t$=t$+"so abraham decides to forget about the abracadabra thing and moves "
  5. 16 t$=t$+"the table using his hands."
  6. 17 rem
  7. 18 rem
  8. 20 input "suchwort";p$:ts=ti
  9. 21 n=len(t$)
  10. 22 m=len(p$)
  11. 100 rem naive matcher
  12. 110 for s=1to n-m
  13. 130 if mid$(p$,1,m)<>mid$(t$,s,m) goto 160
  14. 150 g=g+1
  15. 160 next s
  16. 170 print"der string wurde";g;"mal gefunden"
  17. 180 printti-ts
  18.